-- set these properties outside of the event. That way they will only be set -- once each time the app is run, not once for each event. property crlf : (ASCII character 13) & (ASCII character 10) -- This is a standard header for HTML files. property http_10_header : "HTTP/1.0 200 OK" & crlf & "Server: MacHTTP" & crlf &  "MIME-Version: 1.0" & crlf & "Content-type: text/html" & crlf & crlf -- This is the loop for AppleEvents received by the application. -- When you check the syntax, AppleScript will ask you to locate -- MacHTTP and will set the correct name at that time. on Çevent WWW½sdocÈ path_args  given Çclass kforÈ:http_search_args, Çclass postÈ:post_args, Çclass methÈ:method, Çclass addrÈ:client_address, Çclass userÈ:username, Çclass passÈ:password, Çclass frmuÈ:from_user, Çclass svnmÈ:server_name, Çclass svptÈ:server_port, Çclass scnmÈ:script_name, Çclass ctypÈ:content_type -- Variables available for use: -- http_search_args - stuff in the URL after a ? -- post_args - stuff in the URL after a $ -- method - GET, POST, etc. Used to tell if post_args are valid -- client_address - IP address or domain name of remote client's host -- from_user - non-standard. e-mail address of remote user -- username - authenticated user name -- password - authenticated password -- server_name - name or IP address of this server -- server_port - TCP/IP port number being used by this server -- script_name - URL name of this script -- content_type - MIME content type of post_args -- Return each parameter so you can see what the unprocessed -- information looks like. set return_page to http_10_header  & "Unprocessed Results"  & "

Unprocessed Results

" & return  & "

http_search_args

" & return & http_search_args set return_page to return_page & return  & "

post_args

" & return & post_args & return  & "

method

" & return & method & return  & "

client_address

" & return & client_address & return set return_page to return_page & return  & "

from_user

" & return & from_user & return  & "

server_name

" & return & server_name & return  & "

server_port

" & return & server_port & return set return_page to return_page & return  & "

script_name

" & return & script_name & return  & "

content_type

" & return & content_type & return  & "

username

" & return & username & return  & "

password

" & return set return_page to return_page  & "
Results generated at: " & (current date) Â & "" & "" return return_page end Çevent WWW½sdocÈ